package com.jk.controller;

import com.jk.dto.TemDictData;
import com.jk.pojo.ResponseResult;
import com.jk.service.TemDictDataServiceFeign;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import lombok.Value;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

import java.util.List;

/**
 * @author yzf
 * @version 1.0
 * @ClassName TemDictDataController
 * @program: office
 * @description: TODO
 * @date 2025/2/13 15:03
 */
@Slf4j
@Api(tags = "字典数据")
@RestController
@RequestMapping("/dict")
public class TemDictDataController {

    @Autowired
    private TemDictDataServiceFeign temDictDataServiceFeign;

    @ApiOperation(value = "根据字典类型查询字典数据",httpMethod = "POST",notes = "")
    @PostMapping("findDictByType")
    private ResponseResult<List<TemDictData>> findDictByType(@RequestParam String dictType){
            return new ResponseResult<>(200,"查询成功",temDictDataServiceFeign.findDictByType(dictType));


    }

}
